<template>
  <div class="demo-image__placeholder">
  
        <el-container style="height: 100vh; border: 1px solid #eee">
        <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <el-menu router :default-openeds="['1','2']" >
            <el-menu-item>
             <div class="block">
                <el-image src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1592828196437&di=4c3d6fb1f8a988ac9f8c3f03e788236c&imgtype=0&src=http%3A%2F%2Fwww.mandaringarden.com.cn%2Fpublic%2Fuploads%2F2015%2F05%2F2015052806023413.jpg"/>
            </div>
            </el-menu-item>
            <el-menu-item index="/apply/class" class="el-icon-message-solid">课程申请</el-menu-item>
            <el-menu-item index="/manager/class" class="el-icon-menu">课程管理</el-menu-item>
            <el-menu-item index="/control/user" class="el-icon-s-tools">用户管理</el-menu-item>
            <el-menu-item index="/control/ads" class="el-icon-s-platform">广告设置</el-menu-item>
        </el-menu>
    </el-aside>
    
    <el-container>
        <el-header style="text-align: right; font-size: 12px">
        <el-dropdown @command="out">
            <i class="el-icon-switch-button" style="margin-right: 15px"></i>
            <el-dropdown-menu  slot="dropdown">
              <el-dropdown-item  >退出登录</el-dropdown-item>
            </el-dropdown-menu>
        </el-dropdown>
        <span>{{username}}</span>
        </el-header>
        
        <el-main>
          <router-view></router-view>
            <!--查询界面-->

        </el-main>
    </el-container>
    </el-container>
  
  </div>
</template>

<script>

//import PageTable from '@/components/common/PageTable'
//import {page,updateUseful} from '@/api/modules/book'
//import Edit from './edit'

import {getCookie,removeCookie} from '@/libs/cookie'

export default {
    name: 'book',
   // components:{PageTable,Edit},
   data() {

      return {
        username:'',
        searchForm:{
        title:'',
        src:'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg'
        },
        multipleSelection: [],
        visible: false,
        title:'',
        defaultFormDate:{}
      };
    },
    mounted(){
      let user = JSON.parse(getCookie("user") || '{}');
      this.username = user.nickname
    },

    methods:{
      out(){
        removeCookie("user")
      this.$router.push("/");
      },
  }
  
};
</script>

<style scoped>
  html,body{
    padding: 0%;
    margin: 0;
  }
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
  }
  
  .el-aside {
    color: #333;

  }

</style>